package org.apache.servicecomb.fence.resource;

import org.apache.servicecomb.fence.api.resource.Student;
import org.apache.servicecomb.fence.resource.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentLogicService {

    @Autowired
    private StudentMapper studentMapper;

    public Student getById(Long id) {

        if (id == null) {
            throw  new RuntimeException("无有效id");
        }
        return studentMapper.getStudengById(id);
    }
}
